package cn.apiManager.service.impl;

import java.util.Date;
import java.util.List;

import javax.annotation.Resource;

import org.beetl.sql.core.db.Page;
import org.springframework.stereotype.Service;

import cn.apiManager.common.Constant;
import cn.apiManager.dao.UserInfoDao;
import cn.apiManager.entity.UserInfo;
import cn.apiManager.service.UserInfoService;

/**
 * 用户信息 接口类实现类
 **/
@Service
public class UserInfoServiceImpl implements UserInfoService {

	@Resource
	private UserInfoDao userInfoDao;
	
	@Override
	public int deleteByExample(UserInfo example) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public boolean delete(List<Long> ids) {
		// TODO Auto-generated method stub
		return false;
	}

	@Override
	public int insert(UserInfo record) {
		record.setCreateTime(new Date());
		record.setStatus(Constant.STATUS_FALSE);
		return userInfoDao.insert(record);
	}

	@Override
	public int insertSelective(UserInfo record) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public List<UserInfo> selectByExampleList(UserInfo example) {
		return userInfoDao.selectByExampleList(example);
	}

	@Override
	public Page<UserInfo> selectByExamplePage(UserInfo example) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public UserInfo selectByPrimaryKey(Long id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int updateByPrimaryKeySelective(UserInfo record) {
		record.setStatus(Constant.STATUS_TRUE);
		return userInfoDao.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(UserInfo record) {
		// TODO Auto-generated method stub
		return 0;
	}

}
